Skip to content

Conversation

@ksemchh
Copy link

@ksemchh ksemchh commented May 28, 2025

Description:
When connecting to public S3-buckets via boto3, an access error occurred:

botocore.exceptions.ClientError: An error occurred (AccessDenied) when calling the ListObjectsV2 operation: Access Denied

To solve this problem it was necessary to add the parameter signature_version=UNSIGNED when creating the S3 client, which disables request signing, allowing access to public buckets without AWS keys.

Сode changes:
In the S3 client initialization place (utils.py), Config and UNSIGNED are imported from botocore.

In the client constructor client(‘s3’, ...) the argument config=Config(signature_version=UNSIGNED) is passed.

PR checklist:

  • Code is formatted (run scripts/format).
  • Code lints properly (run scripts/lint).
  • Tests pass (run scripts/test).
  • Documentation has been updated to reflect changes, if applicable.
  • Changes are added to the CHANGELOG.

@gadomski
Copy link
Contributor

Can you use AWS_REQUEST_PAYER="requester" in your environment, instead?

@ksemchh
Copy link
Author

ksemchh commented May 29, 2025

Environment variable didn't work for me. The access error is still there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants